<?php

class outinvoiceController {
	
	function __construct() {
	}
/*	
	public function render( $tplname, $data = array() ) {
		$block1 = App::me()->viewPath.DIRECTORY_SEPARATOR.'book'.DIRECTORY_SEPARATOR.$tplname;

		$tpl = App::me()->tpl;
		$tpl->assign('block1', $block1);
		$tpl->assign('active_menu', '1');
		$tpl->assign('data', $data);
		$tpl->display('layout1.tpl');
	}
*/	
	public function index() {		
		if( !Tools::isAjax() ) return;
		session_start();		
		$model = new outinvoice;
		$data = $model->select();
		echo json_encode( $data );
	}
	
	public function insert() {		
		if( !Tools::isAjax() ) return;
		session_start();
		$model = new outinvoice;
		$data = $model->insert();
		echo json_encode( $data );
	}
	
	public function update() {		
		if( !Tools::isAjax() ) return;
		session_start();
		$model = new outinvoice;
		$data = $model->update();
		echo json_encode( $data );
	}
	
	public function delete() {		
		if( !Tools::isAjax() ) return;
		session_start();
		$model = new outinvoice;
		$data = $model->delete();
		echo json_encode( $data );
	}
	
	public function getdeplist() {		
		if( !Tools::isAjax() ) return;
		session_start();
		$model = new outinvoice;
		$data = $model->getdeplist();
		echo json_encode( $data );
	}
	
	public function paylist() {		
		if( !Tools::isAjax() ) return;
		session_start();
		$model = new outinvoice;
		$data = $model->paylist();
		echo json_encode( $data );
	}
	
	public function payinsert() {		
		if( !Tools::isAjax() ) return;
		session_start();
		$model = new outinvoice;
		$data = $model->payinsert();
		echo json_encode( $data );
	}
	
	public function payupdate() {		
		if( !Tools::isAjax() ) return;
		session_start();
		$model = new outinvoice;
		$data = $model->payupdate();
		echo json_encode( $data );
	}
	
	public function paydelete() {		
		if( !Tools::isAjax() ) return;
		session_start();
		$model = new outinvoice;
		$data = $model->paydelete();
		echo json_encode( $data );
	}
	
	public function fullpaylist() {		
		if( !Tools::isAjax() ) return;
		session_start();
		$model = new outinvoice;
		$data = $model->fullpaylist();
		echo json_encode( $data );
	}
	
	public function jsload() {		
		if( !Tools::isAjax() ) return;
		App::me()->js_load('outinvoice.js');
	}	
}
?>